import { get, post } from '@/utils/http'

/**
 * 获取菜单列表
 * @returns 
 */
export const getMenus = () => get('/api/menu/GetMenus')

/**
 * 添加菜单
 * @param {*} data 
 * @param {*} callback 
 * @returns 
 */
export const addMenu = (data, callback) => post('/api/menu/addMenu', data, null, callback)

/**
 * 编辑菜单
 * @param {*} data 
 * @param {*} callback 
 * @returns 
 */
export const editMenu = (data, callback) => post('/api/menu/editMenu', data, null, callback)

/**
 * 删除菜单
 * @param {*} data 
 * @returns 
 */
export const deleteMenu = data => post('/api/menu/deleteMenu', null, data)
